import {businessUrl} from "@/config/env";
import request from "@/config/axios";

// 获取门店列表数据
export const yxSystemStore = ({pageNum, pageSize}) => request({
    url: `${businessUrl}api/yxSystemStore?page=${pageNum}&size=${pageSize}&sort=id%2Cdesc`,
    method: "GET",
})

// 获取门店经纬度信息
export const SystemStoregetL = (address) => request({
    url: `https://restapi.amap.com/v3/geocode/geo?key=cc999dd8ec4ec8f8ccc44cd366ab7962&address=${address}`,
    method: 'get',
    notToken: true
})

// 新增或编辑门店
export const yxSystemStoreAddorEdit = (data) => request({
    url: `${businessUrl}api/yxSystemStore`,
    method: 'put',
    data
})
// 新增或编辑门店   DelyxSystemStore
export const DelyxSystemStore = (data) => request({
    url: `${businessUrl}api/yxSystemStore/`,
    method: 'delete',
    data
})